package br.com.ss.bean;

import java.util.List;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import br.com.ss.entity.Prancha;
import br.com.ss.facade.PranchaFacade;


@ManagedBean(name = "pranchaBean")
@ViewScoped
public class PranchaBean extends AbstractMenageBean {
	
	@EJB
    private PranchaFacade pranchaFacade;
 
    private Prancha prancha;
 
    public List<Prancha> getAllPrancha() {
        return pranchaFacade.findAll();
    }

    public void criarPrancha(){
    	pranchaFacade.save(prancha);
    }

    
    //===============================================================================================================================
    
	public Prancha getPrancha() {
		return prancha;
	}

	public void setPrancha(Prancha prancha) {
		this.prancha = prancha;
	}
  
    
   	

}
